package syntaxTree;

import java.util.LinkedList;

public class ExpCall extends Exp
{	
  Exp exp;
  Id id;
  LinkedList<Exp> expList;

	public ExpCall (Exp exp, Id id, LinkedList<Exp> expList)
	{
	  this.exp=exp;
		this.id = id;
		this.expList=expList;
	}	
	public String toString ()
	{
	
	String result = "";
 	result += exp.toString();
	result += id.toString();
	result += "(";
	int len = expList.size();
	int i = 0;
	while (i<len-1)
	{
	  Exp e = expList.get(i);
	  result += e.toString ();
	  result += ", ";
	  
	  i++;
	}
	result += (expList.get(i)).toString();
  
	result += ")";
	return result;
	}
	
}
